import Element from 'element'
import Vue from "vue"
import router from "vue-router"
import $http from "axios"
import Header from 'header'

<template>
<Header ref=""></Header>
<Footer></Footer>
<p ref=""></p>
</template>
export default {
    created(){
        //这个代码是异步代码.
        // 当Vue检测到节点挂载\更新完毕后,回调函数立即执行
        // 拿到更新过后数据
        this.$nextTick(()=>{
            this.$refs[xxx]
        })
    },
    mounted(){
        console.log(this.$parent); //返回父组件 {} 
        this.$parent.msg = "xiaowang"
        this.$parent.play(123)

        console.log(this.$children); // [{header},{}]
    },
    provide
}

//全局挂载,
Vue.use(Element) 
Vue.use(router)

Vue.prototype.$http = $http

const vm = new Vue({
    router
}).$mount("#app")

// export default vm



